package com.aqiang.day0528_shop.main.model

import com.aqiang.day0528_shop.main.api.MainApi
import com.aqiang.day0528_shop.main.contract.GoodsTypeContract
import com.aqiang.day0528_shop.main.entity.BaseEntity
import com.aqiang.day0528_shop.main.entity.GoodsTypeEntity
import com.aqiang.day0528_shop.main.entity.SpikeGoodsEntity
import com.aqiang.lib_core.net.RetrofitManage
import com.zy.shopproject2.usercenter.entity.BaseResponseEntity
import kotlinx.coroutines.Deferred

class GoodsTypeModel : GoodsTypeContract.GoodsTypeModel {
    override fun getSpikeGodds(startTime: String): Deferred<BaseEntity<List<SpikeGoodsEntity>>> {
        return RetrofitManage.create(MainApi::class.java).spike(startTime,2,0,3)
    }

    override fun getGoodsType(): Deferred<BaseEntity<List<GoodsTypeEntity>>> {
        return RetrofitManage.create(MainApi::class.java).getGoodsType()
    }
}